//
//  Student.m
//  MARCTest
//
//  Created by yuhang on 15/12/8.
//  Copyright © 2015年 yuhang. All rights reserved.
//

#import "Student.h"

@implementation Student


-(void)setName:(NSString *)name
{
    //retain
    //@property (retain) NSString *name;

    if (![name isEqualToString:_name]) {
        
        [_name release];
        _name=name;
        [_name retain];
        
    }
    
    //copy
    //@property (copy) NSString *name;

    if (![name isEqualToString:_name]) {
        
        [_name release];
        _name=[name copy];
        
    }
    
    
    
    People *p1=[People new];
    
    People *p2;
    
    p2=p1;
    
    int a=1;
    int b;
    
    b=a;
    
    // a或者p1 做了一个copy
    // b或者p2 进行擦写
    // 把copy的副本 赋值给b或者p2
    
}


@end
